﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using 纺织贸易管理系统;

namespace BLL
{
    public static class 样布BLL
    {
        private static SQLHelper.SQLHelper CreatConn()
        {
            var connect = new SQLHelper.ConnectInfo() { Server = "softkc.cn", Port = "1433", PWD = "Kc123456", UID = "sa", Database = "textiletradedn" };
            return new SQLHelper.SQLHelper(connect);
        }
        public static List<db> GetRemortDB(Expression<Func<db, bool>> func)
        {
            try
            {
                return CreatConn().Query<db>(func);
            }
            catch
            {
                return new List<db> ();
            }
        }
        public static List<db> GetRemortDB()
        {
            try
            {
                return CreatConn().Query<db>();
            }
            catch
            {
                return new List<db>();
            }
        }
    }
}
